import { WmsWarehouseAreaItem } from './warehouse-area';
import { defHttp } from '/@/utils/http/axios';

enum Api {
  Crud = '/wms/warehouse',
  List = '/wms/warehouse/list',
}

export const getListData = (params?:any) => defHttp.get<WmsWarehouseItem[]>({ url: Api.List, params: params, });

export const create = (params: any) => defHttp.post({url: Api.Crud, params});

export const update = (params: any) => defHttp.put({url: Api.Crud, params});

export const deletes = (params: number[]) => defHttp.delete({url: Api.Crud, data: params});

export interface WmsWarehouseItem {
  ID: number,
  uid: number;
  name: string;
  code: string;
  enable: number;
  memo: string;
  areaList: WmsWarehouseAreaItem[];
}